<?php foreach ($this->messages as $m) : ?>
    <p class="<?php echo $m['code']; ?>"><?php echo $m['message']; ?></p>
<?php endforeach; ?>